package cn.wolfcode.luowowo.article.mapper;

import cn.wolfcode.luowowo.article.domain.Travel;
import cn.wolfcode.luowowo.common.query.TravelQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface TravelMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Travel record);

    Travel selectByPrimaryKey(Long id);

    List<Travel> selectAll();

    List<Travel> query4List(TravelQuery qo);

    int updateByPrimaryKey(Travel record);

    void updateState(@Param("id") Long id, @Param("state") int state);

    List<Travel> selectByDestIdTop3(Long destId);

    List<Travel> selectByAuthorIdTop5(Long id);

    int query4CountByAuthorId(Long authorId);

    List<Travel> selectByAuthorId(Long id);

    Integer selectReplyCountByAuthorId(Long userId);

    Integer selectViewCountByAuthorId(Long userId);

    List<Travel> selectAllByUserId(Long userId);

    void deleteRelationByTravelId(Long id);
}